<link rel="stylesheet" type="text/css" href="../addons/jy_weishop/custom/templates/mobile/css/orderdetail.css?v=2.1.5">
<style>
.fui-footer .btn {
    margin-top: .4rem;
}
	.order_detail .fui-list-inner .title.has-address {
		font-size: .7rem;
		line-height: 1.2rem;
		height: 1.2rem;
		display: block;
	}
	.order_detail .fui-list-inner .text{
		white-space: nowrap;
		text-overflow: ellipsis;
		overflow: hidden;
	}
	.order_detail .fui-list:before{
		border: 0;
	}
	.order_detail .fui-list_title{
		position: relative;
		display: flex;
		align-items: center;
		line-height: normal;
	}

.fui-cell-remark .r-icon{display:inline-block; line-height: 1.3rem;height:1.3rem;width:1.3rem;border-radius:1.5rem;background:#fbe8ea;color:#e6251}
.order-print-top {background:#eaeaea;height:1.8rem;padding:0 0.4rem;padding-top:0.65rem;border-bottom-right-radius: 3.6rem;border-bottom-left-radius: 3.6rem;}
.order-print-top-line {background:#d2d1d1;height:0.8rem;border-radius: 0.8rem;}
.fui-cell-line {height:1px;border-top: 1px solid #ebebeb;margin:0 0.5rem}
.fui-icon-group .fui-icon-col .icon img{
    height: auto;
    width: 1.3rem;
}
.fui-cell-group.noborder .fui-cell {
    padding: 0.5rem;
}
.disabled {
    opacity: .35;
}
.order-print-dots:before,.order-print-dots:after {
	content:"";
	height:0.5rem;
	width:0.5rem;
	background:#f3f3f3;
	border-radius:0.5rem;
	position:absolute;
}
.order-print-dots:before {
	left:-0.25rem
}
.order-print-dots:after {
	right:-0.25rem
}
.order-print-line {position: relative;border-bottom: 2px dashed #ddd;margin:0.25rem 0.5rem;}
.fui-navbar .cartbtn {padding-right:0.3rem;background:#fff;opacity:1}
.fui-navbar .buybtn  {padding-left:0.3rem;background:#fff}
.fee-tag-nav, .fee-tagup-nav, .fee-disabled-nav {border-radius:1rem;height:2rem;line-height:1.95rem;color:#fff;width:100%;font-weight:400;font-size:0.7rem;margin:0.2rem 0;padding:0 0.2rem}
.fee-tagup {background:linear-gradient(to right,rgba(129,2,138,1),rgba(238,2,253,1));color:#fff;width:auto;font-weight:400;font-size:0.55rem}
.fee-tag-nav {background:linear-gradient(to right,rgba(211,5,5,1),rgba(255,8,8,1));}
.fee-tagup-nav {background:linear-gradient(to right,rgba(129,2,138,1),rgba(190,0,205,1));}
.fee-disabled-nav {background:#bbb;color:#fff;}	
</style>
<div class="fui-page cav order_detail" ng-if="pagedata.order.list.length>0">
		<div class="order-print-top">
			<div class="order-print-top-line">
			</div>
		</div>	
		<div class="fui-content" style="margin:0 0.7rem;width:auto;margin-top:-0.95rem;">
			<div class="fui-cell-group" style="margin-top:0">
				<div class="fui-cell">
					<div class="fui-cell-text">
						<div class="text" style="font-size:0.75rem"><i class="icon icon-shoucang"></i> {{pagedata.selectstore.title}} <i class="icon icon-more"></i></div>
						<div class="subtitle" style="font-size:0.55rem;padding-top:0.5rem">{{pagedata.selectstore.address || '暂无门店地址'}}</div>
					</div>
					<div class="fui-cell-remark noremark">
						<span class="r-icon" href="tel:{{pagedata.order.store.tel || pagedata.order.store.mobile}}">
								<i class="icon icon-phone" style="padding:0 0.3rem;font-size:0.7rem"></i>
						</span>
						<span class="r-icon" style="margin-left:0.6rem" ng-click="pagedata.openLocation(pagedata.order.store);">
								<i class="icon icon-map" style="padding:0 0.3rem;font-size:0.7rem"></i>
						</span>
					</div>
				</div>
			</div>
			<div class="fui-cell-group" style="margin-top:0">
				<div class="fui-cell-line"></div>
				<div class="bold c" style="margin-top:1.5rem;font-size:2rem">{{pagedata.order.tabletitle}}</div>
				<div class="fui-icon-group noborder col-5 radius" style="padding:0 1.5rem">
					<a class="fui-icon-col external">
						<div class="icon"><i class="icon icon-lianxishangjia"></i></div>
						<div class="text">{{pagedata.order.sendtype==1?'点餐中':'已入座'}}</div>
					</a>
					<div class="fui-icon-col" style="margin-top:0">
						<div class="text fui-cell-line" style="margin:0;margin-top:2.38rem"></div>
					</div>
					<a class="fui-icon-col external">
						<div ng-class="{'icon':1,'disabled':!pagedata.order.id}"><i class="icon icon-kuaicanyin"></i></div>
						<div ng-class="{'text':1,'disabled':!pagedata.order.id}">已下单</div>
					</a>
					<div class="fui-icon-col" style="margin-top:0">
						<div class="text fui-cell-line" style="margin:0;margin-top:2.38rem"></div>
					</div>
					<a class="fui-icon-col external">
						<div ng-class="{'icon':1,'disabled':!pagedata.order.id || pagedata.order.status<3}"><i class="icon icon-f13"></i></div>
						<div ng-class="{'text':1,'disabled':!pagedata.order.id || pagedata.order.status<3}">已买单</div>
					</a>
				</div>
				<div class="fui-page-title c">
					<div class="subtitle">{{pagedata.order.statusdesc}}</div>
				</div>
			</div>
		<!--商品信息-->
		<div class="fui-cell-group" style="margin-top:0;">
			<div class="order-print-dots"></div>
			<div class="order-print-line"></div>
			<div ng-if="pagedata.order.oldorderid" class="fui-cell-title bold" style="padding: 0.5rem 0.65rem;">已点菜单明细</div>
			<div ng-repeat="item in pagedata.order.list" ng-if="item.isold==1" class="fui-cell">
					<div class="fui-cell-text">
						{{item.title}}<span ng-if="item.selespename">({{item.selespename}})</span>
					</div>
					<div class="fui-cell-remark noremark">
						<span>￥ {{item.price}} <span class="subtitle" style="margin-left:0.2rem">x{{item.total}} / {{item.unit ||'件'}}</span></span>
					</div>
			</div>
			<div ng-if="pagedata.order.cart_num>0" class="fui-cell-title bold" style="padding: 0.5rem 0.65rem;">{{pagedata.order.oldorderid?'追加':''}}菜单明细</div>
			<div ng-repeat="item in pagedata.order.list" ng-if="item.isold!=1" class="fui-cell">
					<div class="fui-cell-text">
						{{item.title}}<span ng-if="item.selespename">({{item.selespename}})</span>
					</div>
					<div class="fui-cell-remark noremark">
						<span>￥ {{item.price}} <span class="subtitle" style="margin-left:0.2rem">x{{item.total}} / {{item.unit ||'件'}}</span></span>
					</div>
			</div>
			<div ng-repeat="item in pagedata.gifts" class="fui-cell">
					<div class="fui-cell-text">
						{{item.title}}<span class="fui-label fui-label-danger">赠品</span>
					</div>
					<div class="fui-cell-remark noremark">
						<span class="bold oldprice">￥ {{item.price || '0.00'}}</span> <span class="subtitle" style="margin-left:0.2rem">x1</span>
					</div>
			</div>
			<div class="fui-cell">
					<div class="fui-cell-info">
						<span class="r-f bold" style="color:#000;">共{{pagedata.order.total}}份，小计：<span class="price">￥{{price(pagedata.order.total_price) || '0.00'}}</span></span>
					</div>
			</div>
		</div>
		<!--订单详情-->
		<div ng-if="pagedata.order.ordersn" class="fui-cell-group" style="margin-top:0">
			<div class="order-print-dots"></div>
			<div class="order-print-line"></div>
			<div class="fui-cell-title bold" style="padding: 0.5rem 0.65rem;">订单详情</div>
				<div class="fui-cell">
					<div class="fui-cell-info">
						<span style="margin-right: 0.7rem;">订单编号</span>
					</div>
					<div class="fui-cell-remark noremark">
						{{pagedata.order.ordersn}}
					</div>
				</div>
				<div class="fui-cell">
					<div class="fui-cell-info">
						<span style="margin-right:0.7rem;">创建时间</span>
					</div>
					<div class="fui-cell-remark noremark">
						{{pagedata.order.createtime}}
					</div>
				</div>			
					<div ng-show='pagedata.order.status>=1 && pagedata.order.paytime > 0' class="fui-cell">
						<div class="fui-cell-info">
							<span style="margin-right: 0.7rem;">支付时间</span>
						</div>
						<div class="fui-cell-remark noremark">
							{{pagedata.order.paytime}}
						</div>
					</div>
					<div ng-show='pagedata.order.status==3' class="fui-cell">
						<div class="fui-cell-info">
							<span style="margin-right: 0.7rem;">完成时间</span>
						</div>
						<div class="fui-cell-remark noremark">
							{{pagedata.order.finishtime}}
						</div>
					</div>
		</div>
			<div ng-show="pagedata.order_fields && pagedata.order_data" class="fui-cell-group" style="margin-top:0">	
				<div ng-repeat='(key,value) in pagedata.order_fields' class="fui-cell">
					<div class="fui-cell-label">{{value.tp_name}}</div>
					<div class="fui-cell-info">

					</div>
					<div class="fui-cell-remark noremark">
						
					</div>
				</div>
				
			</div>
		<!--商品小计-->
		<div ng-if="!pagedata.order.id || pagedata.order.status==0" class="fui-cell-group" style="margin-top:0">
			<div class="order-print-dots"></div>
			<div class="order-print-line"></div>
			<div class="fui-cell-title bold" style="padding: 0.5rem 0.65rem;">个性需求</div>
			<div ng-if="!pagedata.order.id" class="fui-cell" onclick="$('#showremark').modal();">
				<div class="fui-cell-label" style="width:100px">口味备注</div>
				<div class="fui-cell-text bold r"><span ng-model="pagedata.item.remark" style="color:red">选填</span>({{pagedata.post.remark ? pagedata.post.remark :'50字以内:亲,加急哦!'}})</div>
				<div class="fui-cell-remark" ></div>
			</div>
			<div ng-if="pagedata.order.id && pagedata.order.status==0" class="fui-cell" ng-if="pagedata.post.invoice =='1'">
				<div class="fui-cell-label" style="width:100px">发票抬头</div>
				<div class="fui-cell-text bold r"><span style="color:red">电子</span>({{pagedata.post.invoicegoodstype !=2?'商品明细':'商品类别'}}-{{pagedata.post.fapiaotype2 !=2?'个人':'单位'}})</div>
				<div class="fui-cell-remark" onclick="$('#showfapiao').modal();" ng-click=""></div>
			</div>
		</div>
		<div class="fui-cell-group" style="margin-top:0">
			<div class="order-print-dots"></div>
			<div class="order-print-line"></div>
			<div class="fui-cell-title bold" style="padding: 0.5rem 0.65rem;">优惠详情</div>
			<div ng-if="pagedata.order.id && pagedata.order.status==0" id='coupondiv' class="fui-cell fui-cell-click">
				<div class='fui-cell-label' style='width:auto;'>优惠券</div>
				<div class='fui-cell-text bold r'>{{pagedata.coupons[0].coupon.title5}}</div>
				<div class="fui-cell-remark" onclick="$('#showcoupon').modal();">
					<div ng-if="pagedata.coupons.length>1" class="badge">{{pagedata.coupons.length}}</div>
					<span ng-if="pagedata.coupons.length<=0" class='text'>{{pagedata.order.exitnomerch?'无该商户可用优惠券':'无可用'}}</span>
				</div>
			</div>
			<div ng-if="pagedata.order.taskdiscountprice" class="fui-cell istaskdiscount">
				<div class="fui-cell-label" style='width:auto' >任务活动优惠</div>
				<div class="fui-cell-info"></div>
				<div class="fui-cell-remark noremark bold">-&yen; <span id='showtaskdiscountprice' class='dispatchprice'>{{pagedata.order.taskdiscountprice}}</span></div>
			</div>
			<div ng-if="pagedata.order.taskcut>0" class="fui-cell taskcut" >
				<div class="fui-cell-label" style='width:auto' >任务中心优惠</div>
				<div class="fui-cell-info"></div>
				<div class="fui-cell-remark noremark bold">-&yen; <span id='showtaskcut' class='dispatchprice'>{{pagedata.order.taskcut}}</span></div>
			</div>
			<div ng-if="pagedata.order.lotterydiscountprice>0" class="fui-cell islotterydiscount">
				<div class="fui-cell-label" style='width:auto' >游戏活动优惠</div>
				<div class="fui-cell-info"></div>
				<div class="fui-cell-remark noremark bold">-&yen; <span id='showlotterydiscountprice' class='dispatchprice'>{{pagedata.order.lotterydiscountprice}}</span></div>
			</div>
			<div ng-if="pagedata.order.level_de_price>0" class="fui-cell discount">
				<div class="fui-cell-label" style='width:auto' >会员优惠</div>
				<div class="fui-cell-info"></div>
				<div class="fui-cell-remark noremark bold">-&yen; <span id='showdiscountprice' class='dispatchprice'>{{price(pagedata.order.level_de_price)}}</span></div>
			</div>
			<div ng-if="pagedata.order.luck_de_price>0" class="fui-cell discount">
				<div class="fui-cell-label" style='width:auto' >运势优惠</div>
				<div class="fui-cell-info"></div>
				<div class="fui-cell-remark noremark bold">-&yen; <span id='showdiscountprice' class='dispatchprice'>{{price(pagedata.order.luck_de_price)}}</span></div>
			</div>
			<div ng-if="pagedata.order.isdiscountprice>0" class="fui-cell isdiscount">
				<div class="fui-cell-label" style='width:auto' >促销优惠</div>
				<div class="fui-cell-info"></div>
				<div class="fui-cell-remark noremark bold">-&yen; <span id='showisdiscountprice' class='dispatchprice'>{{price(pagedata.order.isdiscountprice)}}</span></div>
			</div>
			<div ng-if="pagedata.saleset.enough.length>0" class="fui-cell" id="deductenough">
				<div class="fui-cell-label" style='width:auto' >商城优惠 <span style="font-size: .6rem">：单笔满 ￥<span id="deductenough_enough">{{pagedata.order.enough.man}}</span> 元立减￥{{pagedata.order.enough.jian}}</span></div>
				<div class="fui-cell-info"></div>
				<div class="fui-cell-remark noremark bold">-&yen; <span class='dispatchprice'>{{price(pagedata.order.enough.jian)}}</span></div>
			</div>
			<div ng-if="pagedata.order.sale_enough.length>0" class="fui-cell" id="merch_deductenough">
				<div class="fui-cell-label" style='width:auto' >单笔满 <span id="merch_deductenough_enough" class='text-danger'>{{pagedata.order.sale_enough[0].man}}</span> 元立减</div>
				<div class="fui-cell-info"></div>
				<div class="fui-cell-remark noremark bold">-&yen; <span class='dispatchprice'>{{price(pagedata.order.sale_enough[0].jian)}}</span></div>
			</div>
			<div ng-if="pagedata.order.deduct_credit>0" class="fui-cell discount">
				<div class="fui-cell-label" style='width:auto' >积分抵扣（消耗积分<span class="red">{{pagedata.order.delcredit1}}</span>）</div>
				<div class="fui-cell-info"></div>
				<div class="fui-cell-remark noremark bold">-&yen; <span id='showdiscountprice' class='dispatchprice'>{{price(pagedata.order.deduct_credit)}}</span></div>
			</div>
			<div ng-if="pagedata.order.seckillprice" class="fui-cell" id="seckillprice">
				<div class="fui-cell-label" style='width:auto' >秒杀优惠</div>
				<div class="fui-cell-info"></div>
				<div class="fui-cell-remark noremark bold">-&yen; <span class='dispatchprice'>{{price(pagedata.order.seckillprice)}}</span></div>
			</div>
			<div ng-if="pagedata.order.packageprice" class="fui-cell" id="showpackageprice">
				<div class="fui-cell-label" >套餐优惠</div>
				<div class="fui-cell-info"></div>
				<div class="fui-cell-remark noremark bold">
					&yen; <span class='packageprice'>-{{price(pagedata.order.packageprice)}}</span>
				</div>
			</div>
			<div ng-if="pagedata.post.couponid" class="fui-cell">
				<div class="fui-cell-label" style='width:auto' >{{pagedata.post.title5}}(优惠券)</div>
				<div class="fui-cell-info"></div>
				<div ng-if="pagedata.post.backtype!=1" class="fui-cell-remark noremark bold">-&yen; <span class='dispatchprice'>{{pagedata.post.deduct}}</span></div>
				<div ng-if="pagedata.post.backtype==1" class="fui-cell-remark noremark bold"><span class='dispatchprice'>{{pagedata.post.discount}}</span>折</div>
			</div>
			<div ng-if="pagedata.order.credit" class="fui-cell">
				<div class="fui-cell-label">送积分</div>
				<div class="fui-cell-info"></div>
				<div class="fui-cell-remark noremark bold">
					<span class='packageprice'>{{pagedata.order.credit}}个</span>
				</div>
			</div>
			<div ng-if="pagedata.order.out_upfee>0" class="fui-cell">
				<div class="fui-cell-label">打包费</div>
				<div class="fui-cell-info"></div>
				<div class="fui-cell-remark noremark bold">
					<span class='dispatchprice'>￥{{pagedata.order.out_upfee}}</span>
				</div>
			</div>
			<div ng-if="pagedata.order.usernum>0" class="fui-cell">
				<div class="fui-cell-label" style="width:auto">茶位费（{{pagedata.order.usernum}}位）</div>
				<div class="fui-cell-info"></div>
				<div class="fui-cell-remark noremark bold">
					<span class='dispatchprice'>￥{{pagedata.order.out_weifee}}</span>
				</div>
			</div>
			<div ng-if="pagedata.order.outnum_fee>0" class="fui-cell">
				<div class="fui-cell-label">服务费</div>
				<div class="fui-cell-info"></div>
				<div class="fui-cell-remark noremark bold">
					<span class='dispatchprice'>￥{{pagedata.order.outnum_fee}}</span>
				</div>
			</div>
			<div class="fui-cell">
					<div class="fui-cell-info">
							实付费
					</div>
					<div class="fui-cell-remark noremark">
						 <span style='font-size:.75rem'>&yen; {{pagedata.order.endprice}}
					</div>
			</div>
			</div>
		</div>
		<div ng-if="!pagedata.order.id || pagedata.order.status==0" class="fui-navbar order-create-checkout">
			<a ng-if="!pagedata.order.id || pagedata.order.status==0" href="javascript:;" class="nav-item total" style="text-align:left;padding-left:0.5rem">
				<span class="text-danger bigprice">&yen; 
					<span class="totalprice" style="font-size:1.2rem">{{price(pagedata.order.endprice) || '0.00'}}</span>
				</span>
			</a>
			<a ng-if="!pagedata.order.id || pagedata.order.status==0" href="javascript:;" class="nav-item btn buybtn" ng-click="access_json('jy_weidish_xibei/goodslist//orderid='+pagedata.order.id);">	
				<div class="fee-tag-nav">
					{{!pagedata.order.id?'返回点餐':'加个菜'}}
				</div>
			</a>
			<a ng-if="!pagedata.order.id" href="javascript:;" class="nav-item btn btn-danger buybtn" ng-click="pagedata.post_submit(pagedata.post,'jy_weidish_xibei/orderdish/post/')" >
				<div class="fee-tagup-nav">
					确认下单
				</div>
			</a>
			<a ng-if="pagedata.order.id && pagedata.order.oldorderid" href="javascript:;" class="nav-item btn btn-danger buybtn" ng-click="pagedata.post_submit(pagedata.post,'jy_weidish_xibei/orderdish/post/')" >
				<div class="fee-tagup-nav">
					确认加菜
				</div>
			</a>
			<a ng-if="pagedata.order.id && pagedata.order.status==0" href="javascript:;" class="nav-item btn btn-danger buybtn" ng-click="pagedata.pay_check(pagedata.order.id)" >
				<div class="fee-tagup-nav">
					支付订单
				</div>
			</a>
		</div>
		<div ng-if="pagedata.order.status>0" ng-include="sys_html('common/pluginnav',true)"></div>
</div>
<div class='fui-page fui-page-current' ng-if="pagedata.order.list.length==0">
    <div class="fui-content" style="margin-bottom:2.2rem">
		<!--状态-->
			<div class="order_header" style="padding-top: 5rem;">
			  <div class="red" style="width:2.6rem;margin:0 auto">
				<img style="width:2.6rem;" ng-src="{{tomedia(pagedata.pluginset.loadimg) || '../addons/jy_weidish_xibei/resource/images/loadimg.png'}}">
			  </div>
			  <div class="order_detail_ststus c" style="padding:0.3rem;background:none">
					<div style="font-size: 0.85rem;">您还未点单</div>
					<div class="subtitle">快去犒劳一下自己吧~~</div>
			  </div>
			</div>
			<div class="weui_btn_area" style="margin:2rem 4rem;margin-bottom:0.5rem">				
				<a ng-if="!pagedata.item.id" class="weui_btn weui_btn_red" style="border-radius:1rem" href="javascript:" id="showTooltips" ng-click="access_json('jy_weidish_xibei/goodslist/')">前往点餐</a>
			</div>
			<div class="gray c" href="javascript:" id="showTooltips" ng-click="access_json('jy_weishop/order.list//')">查看历史订单</div>
	</div>
	<div ng-include="sys_html('common/pluginnav',true)"></div>
</div>
<div id="showfapiao"  class="modal fade" tabindex="-1" style="z-index:99999;display:none;">
	<div class="modal-dialog" style="width:100%;left:0;bottom:0">
		<div class="modal-bottom">
			<div class="fui-cell-group" style="padding-bottom:2.5rem">
				<div class="fui-cell">
					<div class="fui-cell-label" style="width:100px;font-size:0.9rem">发票</div>
				</div>
				<div class="fui-cell noborder" style="">
					<div class="fui-cell-label bold" style="width:100px;font-size:0.6rem">发票类型</div>
				</div>
				<div class="fui-cell" style="margin-top:-10px">
					<div class="tag">
						<div style="width:100%">
							<span ng-class="{'fui-tag fuilabel fuilabel-red-0 sale-tip':1,'active':pagedata.post.invoicetype !=2}" style="margin-right:10px;" ng-click="pagedata.post.invoicetype=1">电子普通发布</span><span ng-class="{'fui-tag fuilabel fuilabel-red-0 sale-tip':1,'active':pagedata.post.invoicetype==2}" style="margin-right:10px;" ng-click="pagedata.post.invoicetype=2">增值税专用发票</span>
						</div>
						<div class="fui-cell-help">电子普通发票与纸质普通发票具备同等法律效力，可支持报销入账。</div>
					</div>
				</div>
				<div class="fui-cell noborder" style="">
					<div class="fui-cell-label bold" style="width:100px;font-size:0.6rem">发票抬头</div>
				</div>
				<div class="fui-cell" style="margin-top:-10px">
					<div class="tag">
						<div style="width:100%">
							<span ng-class="{'fui-tag fuilabel fuilabel-red-0 sale-tip':1,'active':pagedata.post.fapiaotype2 !=2}" style="margin-right:10px;" ng-click="pagedata.post.fapiaotype2=1;pagedata.post.invoicename=pagedata.item.address.name">个人</span><span ng-class="{'fui-tag fuilabel fuilabel-red-0 sale-tip':1,'active':pagedata.post.fapiaotype2==2}" style="margin-right:10px;" ng-click="pagedata.post.fapiaotype2=2">单位</span>
						</div>
						<div class="fui-cell-info"><input type="text" placeholder="填写抬头，姓名" class="fui-input" ng-model="pagedata.post.invoicename"/></div>
						<div class="fui-cell-info" ng-if="pagedata.post.fapiaotype2 ==2"><input type="text" placeholder="填写税号" class="fui-input" ng-model="pagedata.post.invoicecode"/></div>
					</div>
				</div>
				<div class="fui-cell noborder" style="">
					<div class="fui-cell-label bold" style="width:100px;font-size:0.6rem">收票人信息</div>
				</div>
				<div class="fui-cell sm-cell">
					<div class="fui-cell-label" style="width:80px;">收票人名称</div>
					<div class="fui-cell-info">{{pagedata.item.address.name}}</div>				
				</div>
				<div class="fui-cell sm-cell">
					<div class="fui-cell-label" style="width:80px;">收票人手机</div>
					<div class="fui-cell-info">{{pagedata.item.address.mobile}}</div>				
				</div>
				<div class="fui-cell sm-cell">
					<div class="fui-cell-label " style="width:80px;">收票人邮箱</div>
					<div class="fui-cell-info"><input type="text" placeholder="用来接收电子发票邮箱，可选填" class="fui-input" ng-model="pagedata.post.email"/></div>
				</div>
				<div class="fui-cell noborder">
					<div class="fui-cell-label bold" style="width:80px;">收票人内容</div>
					<div class="fui-cell-info">发票内容选项已根据税法调整，具体请以展示为准</div>
				</div>
				<div class="fui-cell sm-cell">
					<div class="tag">
						<div style="width:100%">
							<span ng-class="{'fui-tag fuilabel fuilabel-red-0 sale-tip':1,'active':pagedata.post.invoicegoodstype !=2}" style="margin-right:10px;" ng-click="pagedata.post.invoicegoodstype=1">商品明细</span><span ng-class="{'fui-tag fuilabel fuilabel-red-0 sale-tip':1,'active':pagedata.post.invoicegoodstype==2}" style="margin-right:10px;" ng-click="pagedata.post.invoicegoodstype=2">商品类别</span>
						</div>
						<div class="fui-cell-help" ng-if="pagedata.post.invoicegoodstype !=2">发票内容将显示详细商品名称与价格信息</div>
						<div class="fui-cell-help" ng-if="pagedata.post.invoicegoodstype ==2">发票内容将显示本商品所属类别及价格详情</div>
					</div>
				</div>
			</div>
			<div class="fui-navbar">
				<a href="javascript:;" aria-hidden="true" data-dismiss="modal" class="nav-item btn btn-danger confirmbtn">确定</a>
			</div>
		</div>
	</div>
</div>
<div id="showcoupon"  class="modal fade" tabindex="-1" style="z-index:99999;display:none;">
	<div class="modal-dialog" style="width:100%;left:0;bottom:0">
		<div class="modal-bottom">
			<div ng-include="sys_html('coupon/common/_picker')"></div>
		</div>
	</div>
</div>
<div id="showremark"  class="modal fade" tabindex="-1" style="z-index:99999;display:none;">
	<div class="modal-dialog" style="width:100%;left:0;bottom:0">
		<div class="modal-bottom">
			<div class="fui-cell-group">
				<div class="fui-cell">
					<div class="fui-cell-label" style="width:100px;font-size:0.9rem">留言</div>
				</div>
				<div class="fui-cell">
					<div class="fui-cell-info c000">
						<textarea rows="5" placeholder="50字以内（选填）" ng-model="pagedata.post.remark"></textarea>
					</div>
				</div>
			</div>
			<div class="fui-navbar">
				<a href="javascript:;"  aria-hidden="true" data-dismiss="modal" class="nav-item btn btn-danger confirmbtn">确定</a>
			</div>
		</div>
	</div>
</div>
<!-- 关注公众号 -->
<div id="attention" ng-if="pagedata.showqrcode==1">
    <div class="attention-alert">
        <div class="attention-img"><img ng-src="{{tomedia(pagedata.shopset2.store_logo) || '../core/resource/images/nopic.jpg'}}" alt=""></div>
        <div class="attention-title">亲爱的上帝，为了您能正常的接收物流信息，请您先关注我们的公众号</div>
        <div class="attention-content">
            <div class="col-jy-2" style="text-align: center;"><img ng-src="{{tomedia(pagedata.shopset2.followqrcode) || '../core/resource/images/nopic.jpg'}}" alt=""style="width: 5.35rem"></div>
            <div class="col-jy-2" style="text-align: center;"><img src="../addons/jy_weishop/images/zhiwen.png" style="width: 3.3rem;margin:auto"></div>
            <p >长按指纹识别图中二维码</p>
        </div>
        <i class="icon icon-cuowu" ng-click="pagedata.showqrcode=0" style="font-size:1.5rem;color:#fff;position: absolute;top:105%;left:46%"></i>
    </div>
</div>
<div ng-include="sys_html('_diycss')"></div>
<script type="text/javascript">
scope.pagedata.post_submit=function(post,post_url){
	scope.post_json(post_url,post,function(result){
		scope.pagedata.order.id=result.order_id;
		scope.pagedata.order.ordersn=result.ordersn;
		scope.pagedata.order.createtime=result.createtime;
		scope.pagedata.order.status=0;
		scope.$evalAsync();
		scope.message('下单成功！','success','jy_weidish_xibei/orderdish//id='+result.order_id);
	});
}
scope.pagedata.pay_check=function(orderid){
	if(scope.pagedata.order.sendtype==1){
		scope.pay_submit({},'jy_weidish_xibei/orderdish/pay/id='+orderid,'jy_weidish_xibei/orderdish//id='+orderid);
		return true;
	}
	scope.confirm({
		'message':'确认要现在买单吗？可以就餐后再买单的！',
		'success':function(){
			scope.pay_submit({},'jy_weidish_xibei/orderdish/pay/id='+orderid,'jy_weidish_xibei/orderdish//id='+orderid);
		},
		'fail':function(){}
	});
}
scope.pagedata.checkcoupon=function(type){
	if(type){
		if(scope.pagedata.post.backtype!=1){
			scope.pagedata.post.no_dispatch_price = scope.pagedata.order.no_dispatch_price - scope.pagedata.post.deduct
			scope.pagedata.post.endprice = scope.pagedata.order.endprice - scope.pagedata.post.deduct
		}else{
			scope.pagedata.post.no_dispatch_price = scope.pagedata.order.no_dispatch_price * scope.pagedata.post.discount / 10;
			scope.pagedata.post.endprice = scope.pagedata.order.endprice * scope.pagedata.post.discount/10		
		}
	}else{
		scope.pagedata.post.couponid=0;
		if(scope.pagedata.post.backtype!=1){
			scope.pagedata.post.no_dispatch_price = scope.pagedata.order.no_dispatch_price
			scope.pagedata.post.endprice = scope.pagedata.order.endprice
		}else{
			scope.pagedata.post.no_dispatch_price = scope.pagedata.order.no_dispatch_price;
			scope.pagedata.post.endprice = scope.pagedata.order.endprice		
		}
	}
	$('#showcoupon').modal('hide');
	scope.$evalAsync();
}
</script>
